package com.bsj.travel.def.common.DTO.web.productTopic;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/***
 * @description ProductTopicDTO
 * @author LiJiaXin
 * @version 1.0.0
 * @time 2024/1/18 11:13
 **/
@Data
public class ProductTopicDTO {

    /**
     * 主键ID
     */
    private Long topicId;

    /**
     * 关联的产品ID
     */
    @NotNull(message = "所属产品不能为空")
    private Long productId;

    /**
     * Topic类
     */
    @NotBlank(message = "Topic类不能为空")
    private String topicClass;

    /**
     * 操作权限 1:发布 2:订阅 3:发布与订阅
     */
    @NotNull(message = "操作权限不能为空")
    @Range(min = 1, max = 3, message = "操作权限不存在")
    private Integer purview;

    /**
     * 描述
     */
    private String descr;
}
